home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / tex / dvi / dvipssrc.zoo / contrib / whichinp.at < prev   
Text File  |  1991-01-26  |  309b  |  14 lines

  1. #!/bin/sh
  2. #
  3. #  Useful with the backtick execution special; helps to find PostScript
  4. #  files on TEXINPUTS.  Contributed by S. P. Q. Rahtz.
  5. #
  6. pathList=`echo ${TEXINPUTS:=.:/usr/local/tex/inputs}  | tr ':' ' '`
  7. theFile=$1
  8.  
  9. for p in $pathList
  10. do
  11.     test -f $p/$theFile && { echo $p/$theFile; exit 0; }
  12. done
  13. exit 1
  14.